<?php
/*
 * widgetTemplate File
 *
 * @link http://riedel-st.de
 * @author Stefan Riedel <sr@riedel-st.de>
 */
?>

<?= CHtml::beginForm(); ?>
<fieldset>
    <legend><?=$fieldsetName?></legend>
    <dl>
        <dt><?= CHtml::label($topListHeader, $tab)?></dt>
        <dd><?= CHTml::activeDropDownList($topListModel, $topDownListLabelIdentifier,
                Chtml::listData($topListData, $topListIdentifier, $topListLabelField), array(
                    'size' => 5,
                    'class' => 'dropdown',
                    'ajax' => array(
                        'type' => 'POST',
                        'url' => array('show' . ucfirst($tab)),
                        'update' => '#'.$tab,
                        'beforeSend' => 'function(){
                            $(".ui-tabs-selected a:first-child").addClass("preloader");
                        }',
                        'complete' => 'function(){
                            $(".ui-tabs-selected a:first-child").removeClass("preloader");
                        }',
                    )
                ))?></dd>
        <dd class="description"><?=$description?></dd>
        <dt><?=$revokeAssignName?></dt>
        <dd><?php $this->render('tabs/revokeAssignList', array('itemModel' => $itemModel, 'assign' => $assign, 'revoke' => $revoke, 'revokedData' => $revokedData, 'assignedData' => $assignedData, 'tab' => $tab))?></dd>
        <dd class="description"><?=$helpText?></dd>
    </dl>
</fieldset>
<?= CHtml::endForm(); ?>